package org.example.ruoxing_admin_springboot3.controller.Oss.miniio;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import org.example.ruoxing_admin_springboot3.httpResponseResult.ResponseResult;
import org.example.ruoxing_admin_springboot3.service.Oss.MinioService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
/**
 * @description minio文件业务controller
 * @author 莫若省
 * @createTime 2024/6/12
*/
@Tag(name = "minio文件业务接口")
@RestController
public class MinioController {
  @Resource private MinioService minioService;
  @PostMapping("/uploadFile")
  @Operation(summary = "单文件上传的接口")
  public ResponseResult<Object> uploadFile(@RequestParam("file") MultipartFile file) {
    return minioService.uploadFile(file);
  }
}
